import { http } from "@/utils/http";
import type { PageResponse } from "src/types";

/** 获取AI订单列表 */
export function getRechargeOrders(
  data?: object
): Promise<PageResponse<RechargeOrdersInfoData>> {
  return http.request({
    url: "/userCenter/getRechargeOrders",
    method: "post",
    data
  });
}
/** AI订单信息 */
export interface RechargeOrdersInfoData {
  id: string;
  channelProdName: string;
  channelProdCover: string;
  price: number;
  quantity: number;
  status: number;
  comboType: number;
  payMoney: number;
  orderTime: string;
  channelType: number;
}
/** 获取其他渠道列表 */
export function getChannelRechargeOrders(
  data?: object
): Promise<PageResponse<ChannelRechargeOrdersInfoData>> {
  return http.request({
    url: "/userCenter/getChannelRechargeOrders",
    method: "post",
    data
  });
}

/** 其他渠道信息 */
export interface ChannelRechargeOrdersInfoData {
  orderId: string;
  channelProdName: string;
  channelProdCover: string;
  price: number;
  quantity: number;
  status: number;
  comboType: number;
  payMoney: number;
  orderTime: string;
  channelType: number;
}
/** 充值信息 */
export interface RechargeAssetInfoData {
  assetType: number;
  assetAmount: number;
}
